<?php
class User extends AppModel {
	var $name = 'User';
	
	// var $hasOne = array(
	//         'Profile' => array(
	//             'className' => 'Profile',
	//             'foreignKey' => 'user_id',
	//             'dependent' => true
	//         )
	//     );
	
	function __construct($id = false, $table = null, $ds = null){
		parent::__construct($id, $table, $ds);
		$this->validate = array(
        'name' => array(
	            'required' => array(
	                'rule' => array('notEmpty'),
	                'message' => 'Please enter your name'
	            		)
        		),
        'email' => array(
            'required' => array(
                'rule' => 'email',
                'message' => 'Invalid format email'
            		)
        ),
        'dob' => array(
            'valid' => array(
                'rule' => 'datetime',
                'message' => 'Please enter a valid date',
				'allowEmpty'=>false
            )
        ),
		'fb_id' => array(
			'allowEmpty' =>true
		)
        );
	}
	
	public function ValidateLogin()
	{
		return false;
	}
	
	public function GetAll()
	{
		$data = $this->find('all');
		return $data;
	}
}
